package gupao.concurrency.simpledemo.risk.model;

import java.util.concurrent.atomic.AtomicReference;

public class RiskCapitalCalcContext {

    private AtomicReference<NodeTree> deptTree = new AtomicReference<>();

    private Throwable lastError;

    public RiskCapitalCalcContext(NodeTree tree) {
        this.deptTree.set(tree);
    }

    public NodeTree getDeptTree() {
        return deptTree.get();
    }

    public Throwable getLastError() {
        return lastError;
    }

    public void setLastError(Throwable lastError) {
        this.lastError = lastError;
    }
}
